1. Field of the Invention
The present invention relates to a stream data processing apparatus and method, which demultiplex multiplexed stream data and decode stream data by an MPEG system.
2. Description of the Related Art
In a synchronous control operation of an MPEG system, system timer information (i.e., STC (System Time Clock)) obtained by a system timer operating according to reference time information (including PCR (Program Clock Reference)) added to multiplexed stream data is compared with reproduction time information (i.e., PTS (Presentation Time Stamp)) added to each piece of stream data, which is obtained by demultiplexing the multiplexed stream data. A reproducing unit provided with a stream data processing apparatus including the MPEG system operates differently depending upon the magnitude relation between the STC and the PTS. In a case where the STC is less than the PTS, the reproducing unit stands ready to reproduce data obtained by decoding the stream data. In a case where the STC is more than the PTS, the reproducing unit discards the data obtained by decoding the stream data. Also, the reproducing unit reproduces data obtained by decoding the stream data when the value represented by the STC reaches that represented by the PTS. In a case where the difference between the values respectively represented by the STC and the PTS is equal to or more than a threshold value, the reproducing unit determines that audio stream data and video stream data are asynchronously reproduced. Immediately, the reproducing unit reproduces the data obtained by decoding the stream data when the value represented by the STC reaches that represented by the PTS. Also, in a case where an overflow of a stream data buffer is detected, the audio stream data and the video stream data may be asynchronously output (see, for example, Patent Document 1).
Patent Document 1: JP-A-2003-101962
However, in a case where the continuity of values respectively represented by the PCR or the PTS is broken for some reason in the synchronous control operation, sometimes, the difference between the values respectively represented by the STC and the PTS is large. When the difference therebetween is equal to or more than the threshold value, the reproducing unit determines that the audio stream data and the video stream data are asynchronously reproduced. Consequently, the stream data are decoded and reproduced even at an undesired reproduction time. Thus, in a case where the continuity of the values respectively represented by the PCR or the PTS is broken, a desired synchronous control operation cannot be performed.